<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8">
<meta name="renderer" content="webkit|ie-comp|ie-stand">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport"
	content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
<meta http-equiv="Cache-Control" content="no-siteapp" />
<link href="${basePath}/public/lib/lightbox2/2.8.1/css/lightbox.css" rel="stylesheet" type="text/css" >
<#include "lib/lib.html" />
<title>用户中心</title>
</head>
<body>
	<nav class="breadcrumb">
	 	 <i class="Hui-iconfont">&#xe67f;</i> 首页 <span class="c-gray en">&gt;</span> 用户中心 <span class="c-gray en">&gt;</span> 洗车工列表
		 <a  class="btn btn-success radius r mr-20"  style="line-height: 1.6em; margin-top: 3px" href="javascript:location.replace(location.href);" title="刷新">
		 <i class="Hui-iconfont">&#xe68f;</i></a>
	</nav>
	<div class="pd-20 text-c">
		<div class="text-c">
			<form action="${basePath}/washerInfo/list.do">
			<div class="text-c" style="padding-bottom: 15px">
				<input type="text" name="washerName" id="washerName" placeholder="账号" value='${map.washerName}' style="width: 200px" class="input-text">
				<input type="text" name="washerRealname" id="washerRealname" placeholder="姓名" value='${map.washerRealname}' style="width: 200px" class="input-text">
				<input type="text" name="washerJobnumber" id="washerJobnumber" placeholder="工号" value='${map.washerJobnumber}' style="width: 200px" class="input-text">
				<input type="text" name="washerMobile" id="washerMobile" placeholder="手机号" value='${map.washerMobile}' style="width: 200px" class="input-text">
				<input type="text" name="washerIsdepEntrust" id="washerIsdepEntrust" placeholder="机器码" value='${map.washerIsdepEntrust}' style="width: 200px" class="input-text">
			</div>
			<div class="text-c">	
				是否交押金<select  name="washerIsdeposit" style="width: 150px;height: 29px;">
					<option value="">请选择</option>
					<option value="1" <#if map.washerIsdeposit==1>selected</#if>>是</option>
					<option value="2" <#if map.washerIsdeposit==2>selected</#if>>否</option>
				</select>
				审核状态<select  name="washerExamine" style="width: 150px;height: 29px;">
					<option value="">请选择</option>
					<option value="1" <#if map.washerExamine==1>selected</#if>>通过</option>
					<option value="2" <#if map.washerExamine==2>selected</#if>>审核中</option>
					<option value="3" <#if map.washerExamine==3>selected</#if>>不通过</option>
				</select>
				押金审核状态<select  name="washerIsdepEntrust" style="width: 150px;height: 29px;">
					<option value="">请选择</option>
					<option value="1" <#if map.washerIsdepEntrust==1>selected</#if>>通过</option>
					<option value="2" <#if map.washerIsdepEntrust==2>selected</#if>>审核中</option>
					<option value="3" <#if map.washerIsdepEntrust==3>selected</#if>>不通过</option>
				</select>
				<button name="" id="" class="btn btn-success" type="submit"> <i class="Hui-iconfont">&#xe665;</i> 搜索 </button>
			</div>
			</form>
		</div>
		<div class="mt-20">
			<div id="page" class="holder"></div>  
			<table class="table table-border table-bordered table-hover table-bg table-sort">
				<thead>
					<tr class="text-c">
						<th>姓名</th>
						<th>手机号</th>
						<th width="60px">昵称</th>
						<th>机器码</th>
						<th>押金</th>
						<th>协议照片</th>
						<th>身份证正面</th>
						<th>手持身份证照片</th>
						<th width="70px">负责区域</th>
						<th>审核状态</th>
						<th>是否交押金</th>
						<th>押金审核状态</th>
						<th width="100">创建时间</th>
						<th width="150">操作</th>
					</tr>
				</thead>
				<tbody>
					<#if list.dataList?? && list.dataList?size gt 0>
					<#list list.dataList as dl >
						<tr class="text-c">
							<td>${dl.washerRealname!}</td>
							<td>${dl.washerMobile!}</td>
							<td>${dl.washerNick}</td>
							<td>${dl.washerMachinecode}</td>
							<td>${dl.washerDeposit}</td>
							<td>
								<a href="${dl.washerProtocolimage!}" data-lightbox="gallery" data-title="">
								<img alt="" src="${dl.washerProtocolimage!}" width="60px" height="60px">
								</a>
							</td>
							<td>
								<a href="${dl.washerPhonecardimage!}" data-lightbox="gallery" data-title="">
								<img alt="" src="${dl.washerPhonecardimage!}" width="60px" height="60px">
								</a>
							</td>
							<td>
								<a href="${dl.washerScphonecardimage!}" data-lightbox="gallery" data-title="">
								<img alt="" src="${dl.washerScphonecardimage!}" width="60px" height="60px">
								</a>
							</td>
							<td>${dl.areaName!}</td>
							<td>
								<#if dl.washerExamine == 1>
									通过
								<#elseif dl.washerExamine == 2>
									审核中
								<#else>
									不通过
								</#if>
							</td>
							<td>
								<#if dl.washerIsdeposit == 1>
									是
								<#else>
									否
								</#if>
							</td>
							<td>
								<#if dl.washerIsdepEntrust == 1>
									通过
								<#elseif dl.washerIsdepEntrust == 2>
									审核中
								<#else>
									不通过
								</#if>
							</td>
							<td>${dl.createTime?string('yyyy-MM-dd')}</td>
							<td class="td-manage">
								<#if dl.washerExamine==2>
									<a title="审核通过" href="javascript:;" onclick="adm_update(this,${dl.id!},1)" class="ml-5" style="text-decoration:none">审核通过</a>
									<a title="审核不通过" href="javascript:;" onclick="adm_update(this,${dl.id!},3)" class="ml-5" style="text-decoration:none">审核不通过</a>
								<#elseif dl.washerExamine==3>
									<a title="审核通过" href="javascript:;" onclick="adm_update(this,${dl.id!},1)" class="ml-5" style="text-decoration:none">审核通过</a>
								<#else>
									<#if dl.washerIsdepEntrust == 2>
										<a title="押金通过" href="javascript:;" onclick="adm_status(this,${dl.id!},1)" class="ml-5" style="text-decoration:none">押金通过</a>
										<a title="押金不通过" href="javascript:;" onclick="adm_status(this,${dl.id!},3)" class="ml-5" style="text-decoration:none">押金不通过</a>
									<#elseif dl.washerIsdepEntrust == 3>
										<a title="押金通过" href="javascript:;" onclick="adm_status(this,${dl.id!},1)" class="ml-5" style="text-decoration:none">押金通过</a>
									<#else>
										<a title="编辑" href="javascript:;" onclick="adm_add('信息编辑','${basePath}/washerInfo/addMachinecodeAp.do?id=${dl.id!}','800','600')" class="ml-5" style="text-decoration:none">编辑</a>
									</#if>
								</#if>
								<#if dl.washerStatus==1>
									<a title="解禁" href="javascript:;" onclick="adm_edit(this,${dl.id!},2)" class="ml-5" style="text-decoration:none">解禁</a>
								<#else>
									<a title="禁用" href="javascript:;" onclick="adm_edit(this,${dl.id!},1)" class="ml-5" style="text-decoration:none">禁用</a>
								</#if>
								<a title="修改" href="javascript:;" onclick="adm_updateInfo('修改','${basePath}/washerInfo/updateAp.do?id=${dl.id!}','700','600')" class="ml-5" style="text-decoration:none">修改</a>
								<a title="查看" href="javascript:;" onclick="adm_find('查看','${basePath}/washerInfo/findWasherInfo.do?id=${dl.id!}','700','600')" class="ml-5" style="text-decoration:none">查看</a>
							</td>
						</tr>
					</#list>
					</#if>
				</tbody>
			</table>
			</br>
			<div class="page_list"></div>
		</div>
	</div>
	<script type="text/javascript" src="${basePath}/public/lib/lightbox2/2.8.1/js/lightbox-plus-jquery.min.js"></script>
	<script type="text/javascript" src="${basePath}/public/lib/jquery/1.9.1/jquery.min.js"></script>
	<script type="text/javascript">
	$(function(){
	 	laypage({
	 	    cont: $('.page_list'), //容器。值支持id名、原生dom对象，jquery对象,
		    pages: ${list.endPage! }, //总页数
	 	    //skip: true, //是否开启跳页
// 	    	skin: 'molv',
	 	    groups: 10, //连续显示分页数
	 	    first: '首页', //若不显示，设置false即可
	 	    last: '尾页', //若不显示，设置false即可
	 	    curr:${list.curPage!},
	 	   	hash: true, //开启hash
	 	    skin: '#00AA91',
	 	    jump: function(obj,first){ //触发分页后的回调
// 	 	       $('.view').html('目前正在第'+ obj.curr +'页，一共有：'+ obj.pages +'页');
	 	    	if(!first){
	 	         	 window.location.href="${basePath}/washerInfo/list.do?curPage="+obj.curr +"&pageData="+10;
	 	    	}
	 	    }
	 	});
	 			
	});
	//状态操作
	function adm_edit(obj, id,status) {
		var name = '确认要解禁吗?';
		if(status == 1){
			name = '确认要禁用吗?';
		}
		layer.confirm(name, function(index) {
			$.ajax({
		      type:"get",
		      async:false,
		       url:"${basePath}/washerInfo/updateS.do?id="+id+"&washerStatus="+status,
		      dataType:"json",
		      success: function(data){
		    	  if(data == 200){
		    		  layer.msg('成功!', {
							icon : 1,
							time : 1000
						});
						location.replace(location.href);
		    	  }else{
		    		  layer.msg('操作失败,请重试!', {
							icon : 1,
							time : 1000
						});
		    	  }  
		      } 
			});
		});
	}
	function adm_status(obj, id,status) {
		var name = '确认要审核不通过吗?';
		if(status == 1){
			name = '确认要审核通过吗?';
		}
		layer.confirm(name, function(index) {
			$.ajax({
		      type:"get",
		      async:false,
		       url:"${basePath}/washerInfo/updateS.do?id="+id+"&washerIsdepEntrust="+status,
		      dataType:"json",
		      success: function(data){
		    	  if(data == 200){
		    		  layer.msg('成功!', {
							icon : 1,
							time : 1000
						});
						location.replace(location.href);
		    	  }else{
		    		  layer.msg('操作失败,请重试!', {
							icon : 1,
							time : 1000
						});
		    	  }  
		      } 
			});
		});
	}
	function adm_update(obj, id,status) {
		var name = '确认要审核不通过吗?';
		if(status == 1){
			name = '确认要审核通过吗?';
		}
		layer.confirm(name, function(index) {
			$.ajax({
		      type:"get",
		      async:false,
		       url:"${basePath}/washerInfo/updateS.do?id="+id+"&washerExamine="+status,
		      dataType:"json",
		      success: function(data){
		    	  if(data == 200){
		    		  layer.msg('成功!', {
							icon : 1,
							time : 1000
						});
						location.replace(location.href);
		    	  }else{
		    		  layer.msg('操作失败,请重试!', {
							icon : 1,
							time : 1000
						});
		    	  }  
		      } 
			});
		});
	}
	//查看
	function adm_find(title, url, w, h){
		layer_show(title, url, w, h);
	}
	//修改
	function adm_updateInfo(title, url, w, h){
		layer_show(title, url, w, h);
	}
	//添加机器码
	function adm_add(title, url, w, h){
		layer_show(title, url, w, h);
	}
	</script>
</body>
</html>